﻿using Microsoft.Windows.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WenSkin.Forms;

namespace WenSkinTest
{
    public partial class Form2 : UIForm
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void wenButton1_Click(object sender, EventArgs e)
        {
            UIButton uIButton2 = new UIButton() { Text = "11111" };
            uIButton2.UIControls.Add(new UIButton() { Text = "11111", Size = new Size(200, 30) });
        }

        private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
        {
            //uiWinControl1.AutoScrollOffset = new Point(0, e.NewValue);
        }

        private void wenButton2_Click(object sender, EventArgs e)
        {
        }

        private void duiButton1_Click(object sender, EventArgs e)
        {
            var button = new UIButton() { Text = "11111", Size = new Size(200, 30) };
            button.Click += Button_Click;
            
            var button2 = new UIButton() { Text = "11111", Size = new Size(200, 30),Location=new Point(0,60) };
            button2.Click += Button_Click;

            duiButton1.UIControls.Add(button);
            duiButton1.UIControls.Add(button2);
        }

        private void Button_Click(object sender, EventArgs e)
        {
            MessageBox.Show("添加的按钮被点击了");
        }
    }
}
